import request from '@/utils/request'

// 获取-权限点列表 /sys/permission
export const getSysPermission = () => {
  return request({
    method: 'GET',
    url: '/sys/permission'
  })
}

// 新增-权限点 /sys/permission
export const postSysPermission = (data) => {
  return request({
    method: 'POST',
    url: '/sys/permission',
    data
  })
}

// 删除-权限点 /sys/permission/{id}
export const delSysPermission = id => {
  return request({
    method: 'DELETE',
    url: `/sys/permission/${id}`
  })
}

// 修改-权限点详情
export const putSysPermission = (data) => {
  return request({
    method: 'PUT',
    url: `/sys/permission/${data.id}`,
    data
  })
}

// 获取-权限点详情 /sys/permission/{id}
export const getSysPermissionId = (id) => {
  return request({
    method: 'GET',
    url: `/sys/permission/${id}`
  })
}
